package com.baizhi.controller;

import com.baizhi.dto.PageDTO;
import com.baizhi.service.LogService;
import com.baizhi.vo.CommonVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
@RequestMapping("log")
public class LogController {

    @Autowired
    private LogService logService;
    private static final Logger log = LoggerFactory.getLogger(LogController.class);

    /**
     * 查所有
     */
    @PostMapping("queryAllPage")
    public CommonVO queryAllPage(PageDTO pageDTO){
        log.info("page: {}",pageDTO);
        CommonVO commonVO = logService.queryPage(pageDTO);
        return commonVO;
    }
}
